<?php

namespace app\index\controller;

use app\common\controller\Frontend;
use app\admin\model\Page as PageModel;

class Page extends Frontend
{

    protected $noNeedLogin = '*';
    protected $noNeedRight = '*';
    protected $layout = '';

    public function info()
    {
   		$id = input('id',0,'intval');
   		//$id = input('post.id',0,'intval');
   		//$id = $this->request->get('id',0,'intval');
   		//$id = $this->request->post('id',0,'intval');
   		//$id = $this->request->param('id',0,'intval');
   		if(empty($id)){
   			$this->error('参数id不能为空');
   		}
   		$pageinfo = PageModel::where('status',1)->where('id',$id)->find();
   		if(empty($pageinfo)){
   			$this->error('没有数据');
   		}
   		$this->assign('cehis',1111);
   		$this->assign('info',$pageinfo);
        return $this->view->fetch();
    }

}
